package com.job.springsea.work0705;

/**
 * @author 于春海
 * @version 1.0
 * @since 2022-07-07 13:40:43
 */
public class RunDemo {
    public static void sort(int s,int t,int n){
        int num=s;
        int[][] arr=new int[n][n];
        for (int col = n-1; col >=0 ; col--) {
            for (int row = 0; row <col; row++) {
                arr[row][col]=num;
                num++;
                num=num>t?1:num;
            }
        }
        for (int row = 0; row <n ; row++) {
            for (int col = 0; col <n ; col++) {
                if(col<=row)
                {
                    System.out.print("\t");
                }else{
                    System.out.print(arr[row][col]+"\t");
                }
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        sort(2,8,9);

        Student stu =new Student();
        stu.age=20;
        stu.height=178;
        stu.eat();;
        stu.sleep();
//        stu=null;
//        stu.eat();
//        NullPointerException

    }
}